1. Field of the Invention
The present invention relates to the field of artifact version control and more particularly to merging artifacts in a version control system.
2. Description of the Related Art
Version control relates to the management of different versions of artifacts produced through repetitive editing by one or more end editors. Often referred to in the context of source code development, software model development and configuration management, version control involves the management of one or more documents when the documents are edited in succession, parallel or both by one or more editors. Put plainly, version control addresses one of two likely contingencies. In a first contingency, an editor applies edits to a document in succession and requires a view to changes in the document from an ancestor version to a contemporary version. In the other contingency, one or more editors concurrently apply different edits to the same document and the edits must be merged into a unified document.
Merging is a common operation when working with versioned artifacts in a version control system. Wherever two or more editors apply edits to the same version of a file in parallel, a merge is required to harmonize the edits the parallel artifacts. Merging unstructured textual artifacts can be a relatively simple operation because within an unstructured textual artifact, there is no relationship from one line to the next. By comparison, merging a structured artifact such as source code or markup can be trying, as the skilled artisan will attest.
Notably, when editing an artifact, a simple line to line change can affect the integrity of structures or objects specified within the artifact. In this regard, the more structural the file content, the worse the problem because relationships between structures within an artifact must be maintained during a merge operation in order to protect the integrity of the artifact. Exacerbating matters, each element in an artifact can have multiple properties, each of which can contain or reference one or more other elements in the artifact. As other relationships can exist only in source code, the structure of an artifact can become exceedingly complex—so much so that attempting to edit the artifact within a mere text editor can virtually guarantee the corruption of the artifact as has been demonstrated by sufficient empirical evidence.
Thus, more sophisticated visual merge tools have become the preferred mode of performing a merge operation. The use of a visual merge tool in a version control system, however, is not without its own set of challenges. In this regard, each individual change can appear within the visual merge tool as a single artifact difference referred to in the art as a “delta”. Yet, each individual change to an element in an artifact by a contributor reflected by a delta can be a candidate for conflict in view of a possible change to the same element by another contributor in another version of the artifact.
Significantly, a single user gesture in editing an artifact, such as the creation of an association between two classes, can generate related changes to many elements and attributes in an artifact thereby producing a multiplicity of deltas for the single gesture—all dependent upon one another. As such, accepting only a portion of the deltas associated with the gesture, but not all of the deltas for the gesture, can result in corruption in an underlying model. To compound matters, resolving a conflict of deltas in favor of an edit to an element in an artifact version by one contributor while resolving a related conflict for one of the deltas in favor of another edit to a different element in a different artifact version by another contributor further can corrupt the model specified in the artifact.
Multiple deltas produced by a single gesture further can provide additional challenges in the form of user interface clutter. Specifically, a single gesture to a model can produce a multiplicity of individual deltas which are visualized in a window in a user interface. As a result, where the list of deltas becomes excessive, the inter-relationships between the deltas may not be apparent from the deltas themselves. Consequently, substantial confusion can be produced resulting in the creation of a logically inaccurate model. Contemporary merge tools are known to produce such clutter by grouping deltas by semantic differences rather than diagram difference. In fairness, however, diagram changes in a merge tool can be difficult to merge because the individual deltas resulting from the diagram change have little context.